home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / AEDataModel.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  21.4 KB  |  722 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        AEDataModel.a
  3. ;
  4. ;    Contains:    AppleEvent Data Model Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1996-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
  19. __AEDATAMODEL__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.  
  28. ;  Apple event descriptor types 
  29.  
  30. typeBoolean                        EQU        'bool'
  31. typeChar                        EQU        'TEXT'
  32. ;  Preferred numeric Apple event descriptor types 
  33.  
  34. typeSInt16                        EQU        'shor'
  35. typeSInt32                        EQU        'long'
  36. typeUInt32                        EQU        'magn'
  37. typeSInt64                        EQU        'comp'
  38. typeIEEE32BitFloatingPoint        EQU        'sing'
  39. typeIEEE64BitFloatingPoint        EQU        'doub'
  40. type128BitFloatingPoint            EQU        'ldbl'
  41. typeDecimalStruct                EQU        'decm'
  42. ;  Non-preferred Apple event descriptor types 
  43.  
  44. typeSMInt                        EQU        'shor'
  45. typeShortInteger                EQU        'shor'
  46. typeInteger                        EQU        'long'
  47. typeLongInteger                    EQU        'long'
  48. typeMagnitude                    EQU        'magn'
  49. typeComp                        EQU        'comp'
  50. typeSMFloat                        EQU        'sing'
  51. typeShortFloat                    EQU        'sing'
  52. typeFloat                        EQU        'doub'
  53. typeLongFloat                    EQU        'doub'
  54. typeExtended                    EQU        'exte'
  55. ;  More Apple event descriptor types 
  56.  
  57. typeAEList                        EQU        'list'
  58. typeAERecord                    EQU        'reco'
  59. typeAppleEvent                    EQU        'aevt'
  60. typeEventRecord                    EQU        'evrc'
  61. typeTrue                        EQU        'true'
  62. typeFalse                        EQU        'fals'
  63. typeAlias                        EQU        'alis'
  64. typeEnumerated                    EQU        'enum'
  65. typeType                        EQU        'type'
  66. typeAppParameters                EQU        'appa'
  67. typeProperty                    EQU        'prop'
  68. typeFSS                            EQU        'fss '
  69. typeKeyword                        EQU        'keyw'
  70. typeSectionH                    EQU        'sect'
  71. typeWildCard                    EQU        '****'
  72. typeApplSignature                EQU        'sign'
  73. typeQDRectangle                    EQU        'qdrt'
  74. typeFixed                        EQU        'fixd'
  75. typeSessionID                    EQU        'ssid'
  76. typeTargetID                    EQU        'targ'
  77. typeProcessSerialNumber            EQU        'psn '
  78. typeKernelProcessID                EQU        'kpid'
  79. typeDispatcherID                EQU        'dspt'
  80. typeNull                        EQU        'null'                ; null or nonexistent data 
  81. ;  Keywords for Apple event attributes 
  82.  
  83. keyTransactionIDAttr            EQU        'tran'
  84. keyReturnIDAttr                    EQU        'rtid'
  85. keyEventClassAttr                EQU        'evcl'
  86. keyEventIDAttr                    EQU        'evid'
  87. keyAddressAttr                    EQU        'addr'
  88. keyOptionalKeywordAttr            EQU        'optk'
  89. keyTimeoutAttr                    EQU        'timo'
  90. keyInteractLevelAttr            EQU        'inte'                ; this attribute is read only - will be set in AESend 
  91. keyEventSourceAttr                EQU        'esrc'                ; this attribute is read only 
  92. keyMissedKeywordAttr            EQU        'miss'                ; this attribute is read only 
  93. keyOriginalAddressAttr            EQU        'from'                ; new in 1.0.1 
  94.  
  95. ;     Constants used for specifying the factoring of AEDescLists. 
  96.  
  97. kAEDescListFactorNone            EQU        0
  98. kAEDescListFactorType            EQU        4
  99. kAEDescListFactorTypeAndSize    EQU        8
  100. ;  Constants used creating an AppleEvent 
  101.  
  102.                                                             ; Constant for the returnID param of AECreateAppleEvent 
  103. kAutoGenerateReturnID            EQU        -1                    ; AECreateAppleEvent will generate a session-unique ID 
  104.                                                             ; Constant for transaction ID’s 
  105. kAnyTransactionID                EQU        0                    ; no transaction is in use 
  106. ;  Apple event manager data types 
  107. ; typedef ResType                         DescType
  108.  
  109. ; typedef FourCharCode                     AEKeyword
  110.  
  111. AEDesc                    RECORD 0
  112. descriptorType             ds.l    1                ; offset: $0 (0)
  113. dataHandle                 ds.l    1                ; offset: $4 (4)
  114. sizeof                     EQU *                    ; size:   $8 (8)
  115.                         ENDR
  116. ; typedef struct AEDesc *                AEDescPtr
  117.  
  118. AEKeyDesc                RECORD 0
  119. descKey                     ds.l    1                ; offset: $0 (0)
  120. descContent                 ds        AEDesc            ; offset: $4 (4)
  121. sizeof                     EQU *                    ; size:   $C (12)
  122.                         ENDR
  123. ;  a list of AEDesc's is a special kind of AEDesc 
  124. AEDescList                RECORD 0
  125. f                         ds        AEDesc
  126. sizeof                     EQU *                    ; size:   $8 (8)
  127.                         ENDR
  128.  
  129.  
  130. ;  AERecord is a list of keyworded AEDesc's 
  131. AERecord                RECORD 0
  132. f                         ds        AEDescList
  133. sizeof                     EQU *                    ; size:   $8 (8)
  134.                         ENDR
  135.  
  136.  
  137. ;  an AEDesc which contains address data 
  138. AEAddressDesc            RECORD 0
  139. f                         ds        AEDesc
  140. sizeof                     EQU *                    ; size:   $8 (8)
  141.                         ENDR
  142.  
  143.  
  144. ;  an AERecord that contains an AppleEvent, and related data types 
  145. AppleEvent                RECORD 0
  146. f                         ds        AERecord
  147. sizeof                     EQU *                    ; size:   $8 (8)
  148.                         ENDR
  149.  
  150.  
  151. ; typedef struct AppleEvent *            AppleEventPtr
  152.  
  153. ; typedef SInt16                         AEReturnID
  154.  
  155. ; typedef SInt32                         AETransactionID
  156.  
  157. ; typedef FourCharCode                     AEEventClass
  158.  
  159. ; typedef FourCharCode                     AEEventID
  160.  
  161. ; typedef SInt8                         AEArrayType
  162.  
  163.  
  164. kAEDataArray                    EQU        0
  165. kAEPackedArray                    EQU        1
  166. kAEDescArray                    EQU        3
  167. kAEKeyDescArray                    EQU        4
  168.  
  169.  
  170. kAEHandleArray                    EQU        2
  171. AEArrayData                RECORD 0
  172. kAEDataArray             ds.w    1                ; offset: $0 (0) <-- really an array of length one
  173.                          ORG 0
  174. kAEPackedArray             ds.b    1                ; offset: $0 (0) <-- really an array of length one
  175.                          ORG 0
  176. kAEHandleArray             ds.l    1                ; offset: $0 (0) <-- really an array of length one
  177.                          ORG 0
  178. kAEDescArray             ds        AEDesc            ; offset: $0 (0) <-- really an array of length one
  179.                          ORG 0
  180. kAEKeyDescArray             ds        AEKeyDesc        ; offset: $0 (0) <-- really an array of length one
  181. sizeof                     EQU *                    ; size:   $C (12)
  182.                         ENDR
  183. ; typedef union AEArrayData *            AEArrayDataPointer
  184.  
  185.  
  186. ; **************************************************************************
  187. ;  These calls are used to set up and modify the coercion dispatch table.
  188. ;*************************************************************************
  189.  
  190. ; typedef UniversalProcPtr                 AECoercionHandlerUPP
  191.  
  192. ;
  193. ; pascal OSErr AEInstallCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, long handlerRefcon, Boolean fromTypeIsDesc, Boolean isSysHandler)
  194. ;
  195.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  196.         Macro
  197.         _AEInstallCoercionHandler
  198.             move.w              #$0A22,D0
  199.             dc.w                $A816
  200.         EndM
  201.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  202.         IMPORT_CFM_FUNCTION AEInstallCoercionHandler
  203.     ENDIF
  204.  
  205. ;
  206. ; pascal OSErr AERemoveCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, Boolean isSysHandler)
  207. ;
  208.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  209.         Macro
  210.         _AERemoveCoercionHandler
  211.             move.w              #$0723,D0
  212.             dc.w                $A816
  213.         EndM
  214.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  215.         IMPORT_CFM_FUNCTION AERemoveCoercionHandler
  216.     ENDIF
  217.  
  218. ;
  219. ; pascal OSErr AEGetCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP *handler, long *handlerRefcon, Boolean *fromTypeIsDesc, Boolean isSysHandler)
  220. ;
  221.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  222.         Macro
  223.         _AEGetCoercionHandler
  224.             move.w              #$0B24,D0
  225.             dc.w                $A816
  226.         EndM
  227.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  228.         IMPORT_CFM_FUNCTION AEGetCoercionHandler
  229.     ENDIF
  230.  
  231.  
  232. ; **************************************************************************
  233. ;  The following calls provide for a coercion interface.
  234. ;*************************************************************************
  235.  
  236. ;
  237. ; pascal OSErr AECoercePtr(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, AEDesc *result)
  238. ;
  239.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  240.         Macro
  241.         _AECoercePtr
  242.             move.w              #$0A02,D0
  243.             dc.w                $A816
  244.         EndM
  245.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  246.         IMPORT_CFM_FUNCTION AECoercePtr
  247.     ENDIF
  248.  
  249. ;
  250. ; pascal OSErr AECoerceDesc(const AEDesc *theAEDesc, DescType toType, AEDesc *result)
  251. ;
  252.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  253.         Macro
  254.         _AECoerceDesc
  255.             move.w              #$0603,D0
  256.             dc.w                $A816
  257.         EndM
  258.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  259.         IMPORT_CFM_FUNCTION AECoerceDesc
  260.     ENDIF
  261.  
  262.  
  263. ; **************************************************************************
  264. ; The following calls apply to any AEDesc. Every 'result' descriptor is
  265. ; created for you, so you will be responsible for memory management
  266. ; (including disposing) of the descriptors so created.  
  267. ;*************************************************************************
  268.  
  269. ;
  270. ; pascal OSErr AECreateDesc(DescType typeCode, const void *dataPtr, Size dataSize, AEDesc *result)
  271. ;
  272.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  273.         Macro
  274.         _AECreateDesc
  275.             move.w              #$0825,D0
  276.             dc.w                $A816
  277.         EndM
  278.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  279.         IMPORT_CFM_FUNCTION AECreateDesc
  280.     ENDIF
  281.  
  282. ;
  283. ; pascal OSErr AEDisposeDesc(AEDesc *theAEDesc)
  284. ;
  285.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  286.         Macro
  287.         _AEDisposeDesc
  288.             move.w              #$0204,D0
  289.             dc.w                $A816
  290.         EndM
  291.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  292.         IMPORT_CFM_FUNCTION AEDisposeDesc
  293.     ENDIF
  294.  
  295. ;
  296. ; pascal OSErr AEDuplicateDesc(const AEDesc *theAEDesc, AEDesc *result)
  297. ;
  298.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  299.         Macro
  300.         _AEDuplicateDesc
  301.             move.w              #$0405,D0
  302.             dc.w                $A816
  303.         EndM
  304.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  305.         IMPORT_CFM_FUNCTION AEDuplicateDesc
  306.     ENDIF
  307.  
  308.  
  309. ; **************************************************************************
  310. ;  The following calls apply to AEDescList. Since AEDescList is a subtype of
  311. ;  AEDesc, the calls in the previous section can also be used for AEDescList.
  312. ;  All list and array indices are 1-based. If the data was greater than
  313. ;  maximumSize in the routines below, then actualSize will be greater than
  314. ;  maximumSize, but only maximumSize bytes will actually be retrieved.
  315. ;*************************************************************************
  316.  
  317. ;
  318. ; pascal OSErr AECreateList(const void *factoringPtr, Size factoredSize, Boolean isRecord, AEDescList *resultList)
  319. ;
  320.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  321.         Macro
  322.         _AECreateList
  323.             move.w              #$0706,D0
  324.             dc.w                $A816
  325.         EndM
  326.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  327.         IMPORT_CFM_FUNCTION AECreateList
  328.     ENDIF
  329.  
  330. ;
  331. ; pascal OSErr AECountItems(const AEDescList *theAEDescList, long *theCount)
  332. ;
  333.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  334.         Macro
  335.         _AECountItems
  336.             move.w              #$0407,D0
  337.             dc.w                $A816
  338.         EndM
  339.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  340.         IMPORT_CFM_FUNCTION AECountItems
  341.     ENDIF
  342.  
  343. ;
  344. ; pascal OSErr AEPutPtr(AEDescList *theAEDescList, long index, DescType typeCode, const void *dataPtr, Size dataSize)
  345. ;
  346.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  347.         Macro
  348.         _AEPutPtr
  349.             move.w              #$0A08,D0
  350.             dc.w                $A816
  351.         EndM
  352.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  353.         IMPORT_CFM_FUNCTION AEPutPtr
  354.     ENDIF
  355.  
  356. ;
  357. ; pascal OSErr AEPutDesc(AEDescList *theAEDescList, long index, const AEDesc *theAEDesc)
  358. ;
  359.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  360.         Macro
  361.         _AEPutDesc
  362.             move.w              #$0609,D0
  363.             dc.w                $A816
  364.         EndM
  365.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  366.         IMPORT_CFM_FUNCTION AEPutDesc
  367.     ENDIF
  368.  
  369. ;
  370. ; pascal OSErr AEGetNthPtr(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  371. ;
  372.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  373.         Macro
  374.         _AEGetNthPtr
  375.             move.w              #$100A,D0
  376.             dc.w                $A816
  377.         EndM
  378.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  379.         IMPORT_CFM_FUNCTION AEGetNthPtr
  380.     ENDIF
  381.  
  382. ;
  383. ; pascal OSErr AEGetNthDesc(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, AEDesc *result)
  384. ;
  385.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  386.         Macro
  387.         _AEGetNthDesc
  388.             move.w              #$0A0B,D0
  389.             dc.w                $A816
  390.         EndM
  391.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  392.         IMPORT_CFM_FUNCTION AEGetNthDesc
  393.     ENDIF
  394.  
  395. ;
  396. ; pascal OSErr AESizeOfNthItem(const AEDescList *theAEDescList, long index, DescType *typeCode, Size *dataSize)
  397. ;
  398.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  399.         Macro
  400.         _AESizeOfNthItem
  401.             move.w              #$082A,D0
  402.             dc.w                $A816
  403.         EndM
  404.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  405.         IMPORT_CFM_FUNCTION AESizeOfNthItem
  406.     ENDIF
  407.  
  408. ;
  409. ; pascal OSErr AEGetArray(const AEDescList *theAEDescList, AEArrayType arrayType, AEArrayDataPointer arrayPtr, Size maximumSize, DescType *itemType, Size *itemSize, long *itemCount)
  410. ;
  411.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  412.         Macro
  413.         _AEGetArray
  414.             move.w              #$0D0C,D0
  415.             dc.w                $A816
  416.         EndM
  417.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  418.         IMPORT_CFM_FUNCTION AEGetArray
  419.     ENDIF
  420.  
  421. ;
  422. ; pascal OSErr AEPutArray(AEDescList *theAEDescList, AEArrayType arrayType, const AEArrayData *arrayPtr, DescType itemType, Size itemSize, long itemCount)
  423. ;
  424.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  425.         Macro
  426.         _AEPutArray
  427.             move.w              #$0B0D,D0
  428.             dc.w                $A816
  429.         EndM
  430.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  431.         IMPORT_CFM_FUNCTION AEPutArray
  432.     ENDIF
  433.  
  434. ;
  435. ; pascal OSErr AEDeleteItem(AEDescList *theAEDescList, long index)
  436. ;
  437.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  438.         Macro
  439.         _AEDeleteItem
  440.             move.w              #$040E,D0
  441.             dc.w                $A816
  442.         EndM
  443.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  444.         IMPORT_CFM_FUNCTION AEDeleteItem
  445.     ENDIF
  446.  
  447.  
  448. ; **************************************************************************
  449. ; The following calls apply to AERecord. Since AERecord is a subtype of
  450. ; AEDescList, the calls in the previous sections can also be used for
  451. ; AERecord an AERecord can be created by using AECreateList with isRecord
  452. ; set to true. 
  453. ;*************************************************************************
  454.  
  455. ;  Note: none of the “key” calls were available in the PowerPC 7.x IntefaceLib.
  456. ;  In C, a #define is used to map “key” calls to “param” calls.  In pascal
  457. ;  this mapping is done in externally linked glue code.
  458. ;
  459.  
  460.  
  461. ;
  462. ; pascal OSErr AEPutKeyPtr(AERecord *theAERecord, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  463. ;
  464.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  465.         Macro
  466.         _AEPutKeyPtr
  467.             move.w              #$0A0F,D0
  468.             dc.w                $A816
  469.         EndM
  470.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  471.         IMPORT_CFM_FUNCTION AEPutKeyPtr
  472.     ENDIF
  473.  
  474. ;
  475. ; pascal OSErr AEPutKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  476. ;
  477.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  478.         Macro
  479.         _AEPutKeyDesc
  480.             move.w              #$0610,D0
  481.             dc.w                $A816
  482.         EndM
  483.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  484.         IMPORT_CFM_FUNCTION AEPutKeyDesc
  485.     ENDIF
  486.  
  487. ;
  488. ; pascal OSErr AEGetKeyPtr(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  489. ;
  490.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  491.         Macro
  492.         _AEGetKeyPtr
  493.             move.w              #$0E11,D0
  494.             dc.w                $A816
  495.         EndM
  496.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  497.         IMPORT_CFM_FUNCTION AEGetKeyPtr
  498.     ENDIF
  499.  
  500. ;
  501. ; pascal OSErr AEGetKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  502. ;
  503.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  504.         Macro
  505.         _AEGetKeyDesc
  506.             move.w              #$0812,D0
  507.             dc.w                $A816
  508.         EndM
  509.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  510.         IMPORT_CFM_FUNCTION AEGetKeyDesc
  511.     ENDIF
  512.  
  513. ;
  514. ; pascal OSErr AESizeOfKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  515. ;
  516.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  517.         Macro
  518.         _AESizeOfKeyDesc
  519.             move.w              #$0829,D0
  520.             dc.w                $A816
  521.         EndM
  522.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  523.         IMPORT_CFM_FUNCTION AESizeOfKeyDesc
  524.     ENDIF
  525.  
  526. ;
  527. ; pascal OSErr AEDeleteKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword)
  528. ;
  529.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  530.         Macro
  531.         _AEDeleteKeyDesc
  532.             move.w              #$0413,D0
  533.             dc.w                $A816
  534.         EndM
  535.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  536.         IMPORT_CFM_FUNCTION AEDeleteKeyDesc
  537.     ENDIF
  538.  
  539. ; **************************************************************************
  540. ;  The following calls create and manipulate the AppleEvent data type.
  541. ;*************************************************************************
  542.  
  543. ;
  544. ; pascal OSErr AECreateAppleEvent(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, AppleEvent *result)
  545. ;
  546.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  547.         Macro
  548.         _AECreateAppleEvent
  549.             move.w              #$0B14,D0
  550.             dc.w                $A816
  551.         EndM
  552.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  553.         IMPORT_CFM_FUNCTION AECreateAppleEvent
  554.     ENDIF
  555.  
  556.  
  557. ; **************************************************************************
  558. ;  The following calls are used to pack and unpack parameters from records
  559. ;  of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
  560. ;  in the previous sections can also be used for variables of type
  561. ;  AppleEvent. The next six calls are in fact identical to the six calls
  562. ;  for AERecord.
  563. ;*************************************************************************
  564.  
  565. ;
  566. ; pascal OSErr AEPutParamPtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  567. ;
  568.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  569.         Macro
  570.         _AEPutParamPtr
  571.             move.w              #$0A0F,D0
  572.             dc.w                $A816
  573.         EndM
  574.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  575.         IMPORT_CFM_FUNCTION AEPutParamPtr
  576.     ENDIF
  577.  
  578. ;
  579. ; pascal OSErr AEPutParamDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  580. ;
  581.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  582.         Macro
  583.         _AEPutParamDesc
  584.             move.w              #$0610,D0
  585.             dc.w                $A816
  586.         EndM
  587.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  588.         IMPORT_CFM_FUNCTION AEPutParamDesc
  589.     ENDIF
  590.  
  591. ;
  592. ; pascal OSErr AEGetParamPtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  593. ;
  594.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  595.         Macro
  596.         _AEGetParamPtr
  597.             move.w              #$0E11,D0
  598.             dc.w                $A816
  599.         EndM
  600.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  601.         IMPORT_CFM_FUNCTION AEGetParamPtr
  602.     ENDIF
  603.  
  604. ;
  605. ; pascal OSErr AEGetParamDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  606. ;
  607.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  608.         Macro
  609.         _AEGetParamDesc
  610.             move.w              #$0812,D0
  611.             dc.w                $A816
  612.         EndM
  613.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  614.         IMPORT_CFM_FUNCTION AEGetParamDesc
  615.     ENDIF
  616.  
  617. ;
  618. ; pascal OSErr AESizeOfParam(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  619. ;
  620.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  621.         Macro
  622.         _AESizeOfParam
  623.             move.w              #$0829,D0
  624.             dc.w                $A816
  625.         EndM
  626.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  627.         IMPORT_CFM_FUNCTION AESizeOfParam
  628.     ENDIF
  629.  
  630. ;
  631. ; pascal OSErr AEDeleteParam(AppleEvent *theAppleEvent, AEKeyword theAEKeyword)
  632. ;
  633.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  634.         Macro
  635.         _AEDeleteParam
  636.             move.w              #$0413,D0
  637.             dc.w                $A816
  638.         EndM
  639.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  640.         IMPORT_CFM_FUNCTION AEDeleteParam
  641.     ENDIF
  642.  
  643.  
  644.  
  645. ; **************************************************************************
  646. ; The following calls also apply to type AppleEvent. Message attributes are
  647. ; far more restricted, and can only be accessed through the following 5
  648. ; calls. The various list and record routines cannot be used to access the
  649. ; attributes of an event. 
  650. ;*************************************************************************
  651.  
  652. ;
  653. ; pascal OSErr AEGetAttributePtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  654. ;
  655.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  656.         Macro
  657.         _AEGetAttributePtr
  658.             move.w              #$0E15,D0
  659.             dc.w                $A816
  660.         EndM
  661.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  662.         IMPORT_CFM_FUNCTION AEGetAttributePtr
  663.     ENDIF
  664.  
  665. ;
  666. ; pascal OSErr AEGetAttributeDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  667. ;
  668.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  669.         Macro
  670.         _AEGetAttributeDesc
  671.             move.w              #$0826,D0
  672.             dc.w                $A816
  673.         EndM
  674.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  675.         IMPORT_CFM_FUNCTION AEGetAttributeDesc
  676.     ENDIF
  677.  
  678. ;
  679. ; pascal OSErr AESizeOfAttribute(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  680. ;
  681.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  682.         Macro
  683.         _AESizeOfAttribute
  684.             move.w              #$0828,D0
  685.             dc.w                $A816
  686.         EndM
  687.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  688.         IMPORT_CFM_FUNCTION AESizeOfAttribute
  689.     ENDIF
  690.  
  691. ;
  692. ; pascal OSErr AEPutAttributePtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  693. ;
  694.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  695.         Macro
  696.         _AEPutAttributePtr
  697.             move.w              #$0A16,D0
  698.             dc.w                $A816
  699.         EndM
  700.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  701.         IMPORT_CFM_FUNCTION AEPutAttributePtr
  702.     ENDIF
  703.  
  704. ;
  705. ; pascal OSErr AEPutAttributeDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  706. ;
  707.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  708.         Macro
  709.         _AEPutAttributeDesc
  710.             move.w              #$0627,D0
  711.             dc.w                $A816
  712.         EndM
  713.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  714.         IMPORT_CFM_FUNCTION AEPutAttributeDesc
  715.     ENDIF
  716.  
  717.  
  718.  
  719.     ENDIF ; __AEDATAMODEL__ 
  720.  
  721.